00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _uc_components_h_
00019 #define _uc_components_h_
00020
00021 #include "boost/smart_ptr/shared_ptr.hpp"
00022 #include "gridpack/component/base_component.hpp"
00023 #include "gridpack/component/optimization_ifc.hpp"
00024 #include "gridpack/component/data_collection.hpp"
00025 #include "gridpack/network/base_network.hpp"
00026
00027 namespace gridpack {
00028 namespace unit_commitment {
00029
00030 class UCBus
00031 : public gridpack::component::BaseBusComponent
00032
00033
00034 {
00035 public:
00036 typedef struct { double load;
00037 double reserve; } uc_ts_data;
00038
00039
00040
00041 UCBus(void);
00042
00043
00044
00045
00046 ~UCBus(void);
00047
00048
00049
00050
00051
00052
00053
00054
00055 void load(const boost::shared_ptr<gridpack::component::DataCollection> &data);
00056
00057
00058
00059
00060 double objectiveFunction(void);
00061
00062
00063
00064 bool solution(void);
00065
00066
00067
00068
00069
00070
00071 void setTimeSeries(uc_ts_data *data, int nvals);
00072
00073 int numGen;
00074 std::vector<double> p_iniLevel;
00075 std::vector<double> p_minUpTime;
00076 std::vector<double> p_minDownTime;
00077 std::vector<double> p_minPower;
00078 std::vector<double> p_maxPower;
00079 std::vector<double> p_costConst;
00080 std::vector<double> p_costLinear;
00081 std::vector<double> p_costQuad;
00082 std::vector<double> p_rampUp;
00083 std::vector<double> p_rampDown;
00084 std::vector<double> p_startUp;
00085 std::vector<double> p_initPeriod;
00086 std::vector<double> p_startCap;
00087 std::vector<double> p_shutCap;
00088 std::vector<double> p_opMaxGen;
00089 std::vector<double> p_powerProduced;
00090 std::vector<double> p_powerReserved;
00091 std::vector<int> p_gen;
00092 std::vector<double> p_load;
00093 std::vector<double> p_reserve;
00094 private:
00095 int p_num_generator;
00096 int p_bus_id;
00097
00098 friend class boost::serialization::access;
00099
00100 template<class Archive>
00101 void serialize(Archive & ar, const unsigned int version)
00102 {
00103 ar & boost::serialization::base_object<gridpack::component::BaseBusComponent>(*this)
00104 & p_num_generator;
00105 }
00106
00107 };
00108
00109 class UCBranch
00110 : public gridpack::component::BaseBranchComponent {
00111 public:
00112
00113
00114
00115 UCBranch(void);
00116
00117
00118
00119
00120 ~UCBranch(void);
00121
00122
00123
00124
00125
00126
00127
00128
00129 void load(const boost::shared_ptr<gridpack::component::DataCollection> &data);
00130
00131
00132
00133 private:
00134
00135
00136 };
00137
00138
00139
00140 typedef network::BaseNetwork<UCBus, UCBranch > UCNetwork;
00141
00142
00143 }
00144 }
00145
00146 BOOST_CLASS_EXPORT_KEY(gridpack::unit_commitment::UCBus)
00147 BOOST_CLASS_EXPORT_KEY(gridpack::unit_commitment::UCBranch)
00148
00149
00150 #endif